package com.wjx.service;


import com.wjx.dao.IParkingspacesDao;
import com.wjx.dao.ParkingspacesDaoImpl;
import com.wjx.po.Parkingspaces;

import java.util.List;

public class ParkingspacesBizImpl implements IParkingspacesBiz {
    //引入dao包对象
   public IParkingspacesDao pa=new ParkingspacesDaoImpl();
    @Override
    public boolean add(Parkingspaces parkingspaces) {
        int result = pa.add(parkingspaces);
        if (result>0){
            return true;
        }else {
            return false;
        }
    }

    @Override
    public boolean delete(int psid) {
        int result = pa.delete(psid);
        if (result>0){
            return true;
        }else {
            return false;
        }
    }

    @Override
    public boolean update(Parkingspaces parkingspaces) {
        int result =pa.update(parkingspaces);
        if (result>0){
            return true;
        }else {
            return false;
        }
    }

    @Override
    public List<Parkingspaces> findAll() {
        List<Parkingspaces> list=pa.findAll();
        return list;
    }

    @Override
    public Parkingspaces findById(int psid) {
        Parkingspaces pr=pa.findById(psid);
        return pr;
    }
}
